package com.xm.settlement.service.impl;

import com.baomidou.framework.service.impl.SuperServiceImpl;
import com.baomidou.mybatisplus.plugins.Page;
import com.xm.settlement.commons.utils.PageInfo;
import com.xm.settlement.mapper.MessageManageMapper;
import com.xm.settlement.model.MessageManage;
import com.xm.settlement.service.IMessageManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/3/30.
 */
@Service
public class MessageManageServicImpl extends SuperServiceImpl<MessageManageMapper,MessageManage> implements IMessageManageService {

    @Autowired
    private MessageManageMapper messageManageMapper;

    @Override
    public void selectDataGrid(PageInfo pageInfo) {
        Page<MessageManage> page = new Page<>(pageInfo.getNowpage(), pageInfo.getSize());
        Long createId = Long.valueOf(String.valueOf(pageInfo.getCondition().get("createId")));
        List<MessageManage> list = messageManageMapper.selectMessageManageList(page,createId);
        pageInfo.setRows(list);
        pageInfo.setTotal(page.getTotal());
    }


/*    public List<Resource> selectAll() {
        EntityWrapper<MessageManage> wrapper = new EntityWrapper<MessageManage>();
        return messageManageMapper.selectList(wrapper);
    }*/
}
